.ai-tools-container {
  padding: 0;
  height: calc(100vh - 64px);
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;

  // 欢迎页面
  .welcome-page {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;

    .greeting {
      font-size: 32px;
      font-weight: 600;
      color: #262626;
      margin-bottom: 40px;
      text-align: center;
    }

    .input-wrapper {
      width: 100%;
      margin-bottom: 32px;

      .input-box {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

        .ant-input {
          font-size: 15px;
          color: #262626;
          min-height: 80px;

          &::placeholder {
            color: #bfbfbf;
          }
        }

        .input-footer {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-top: 12px;
          padding-top: 12px;
          border-top: 1px solid #f0f0f0;

          .ant-btn-text {
            color: #8c8c8c;

            &:hover {
              color: #1890ff;
            }
          }

          .ant-btn-circle {
            width: 36px;
            height: 36px;
          }
        }
      }
    }

    .tools-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 16px;
      width: 100%;

      .tool-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 16px 8px;
        background: #fff;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

        .tool-icon {
          font-size: 24px;
        }

        .tool-label {
          font-size: 13px;
          color: #595959;
        }
      }
    }
  }

  // 对话页面
  .chat-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      max-width: 900px;
      margin: 0 auto;
      width: 100%;

      .message-item {
        display: flex;
        gap: 12px;
        margin-bottom: 24px;

        &.user {
          flex-direction: row-reverse;

          .message-content {
            align-items: flex-end;

            .message-bubble {
              background: #1890ff;
              color: #fff;
            }
          }
        }

        &.ai {
          .message-bubble {
            background: #fff;
            color: #262626;
            border: 1px solid #e5e7eb;
          }
        }

        .message-content {
          display: flex;
          flex-direction: column;
          gap: 4px;
          max-width: 70%;

          .message-bubble {
            padding: 12px 16px;
            border-radius: 12px;
            line-height: 1.6;
            font-size: 14px;
            word-wrap: break-word;

            &.loading {
              display: flex;
              align-items: center;
              background: #fff;
              border: 1px solid #e5e7eb;
              color: #8c8c8c;
            }
          }

          .message-time {
            font-size: 12px;
            color: #8c8c8c;
            padding: 0 4px;
          }
        }
      }

      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
      }

      &::-webkit-scrollbar-thumb {
        background: #d9d9d9;
        border-radius: 3px;

        &:hover {
          background: #bfbfbf;
        }
      }
    }

    .chat-input {
      padding: 16px 24px;
      border-top: 1px solid #f0f0f0;
      background: #fff;
      max-width: 900px;
      margin: 0 auto;
      width: 100%;

      .input-box {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px 16px;

        .ant-input {
          font-size: 15px;
          color: #262626;

          &::placeholder {
            color: #bfbfbf;
          }
        }

        .input-footer {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-top: 8px;
          padding-top: 8px;
          border-top: 1px solid #f0f0f0;

          .ant-btn-text {
            color: #8c8c8c;

            &:hover {
              color: #1890ff;
            }
          }

          .ant-btn-circle {
            width: 36px;
            height: 36px;
          }
        }
      }
    }
  }

  @media (max-width: 1024px) {
    .welcome-page {
      .tools-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }
  }

  @media (max-width: 768px) {
    .welcome-page {
      .greeting {
        font-size: 24px;
      }

      .tools-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .chat-page {
      .chat-messages {
        .message-item {
          .message-content {
            max-width: 85%;
          }
        }
      }
    }
  }
}
